Snapshots of states of a file system can be generated to enable a user to access the file system at previous states or restore the file system to previous states. Conventionally, a file system can be represented through tree structures (e.g., B-Trees) having nodes. In some approaches, the file system can utilize reference counts to track whether the nodes are referenced by existing snapshots (and therefore should remain intact). However, such practices can be time-consuming and wasteful of computational resources as the file system grows increasingly complex over time. Accordingly, there is a need for improved techniques for generating snapshots of a file system.